From 50193242eac116958590034ad0d4c9ce2be779f1 Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Tue, 11 Dec 2007 10:22:37 -0700 Subject: [PATCH] [IA64] Stop all cpus at panic Current panic() of hypervisor doesn't stop all cpus. So domains can work after hypervisor panic (when using noreboot option). If dom0 continues to work after xen panic, the system may get into serious problems. This patch fixes the issue. I chose cpu_halt() to stop other cpus by smp_send_stop(). I think it should work fine for kexec. machine_halt() is only spinloop for leaving the panic calltrace. Signed-off-by: Akio Takebe --- xen/arch/ia64/linux-xen/smp.c | 4 ---- xen/arch/ia64/xen/domain.c | 10 ++++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/xen/arch/ia64/linux-xen/smp.c b/xen/arch/ia64/linux-xen/smp.c index f9ae4f2781..5ebe45cf38 100644 --- a/xen/arch/ia64/linux-xen/smp.c +++ b/xen/arch/ia64/linux-xen/smp.c @@ -122,9 +122,7 @@ stop_this_cpu (void) cpu_clear(smp_processor_id(), cpu_online_map); max_xtp(); local_irq_disable(); -#ifndef XEN cpu_halt(); -#endif } void @@ -132,9 +130,7 @@ cpu_die(void) { max_xtp(); local_irq_disable(); -#ifndef XEN cpu_halt(); -#endif /* Should never be here */ BUG(); for (;;); diff --git a/xen/arch/ia64/xen/domain.c b/xen/arch/ia64/xen/domain.c index 1cb19453c4..577721d76c 100644 --- a/xen/arch/ia64/xen/domain.c +++ b/xen/arch/ia64/xen/domain.c @@ -2207,10 +2207,12 @@ extern void cpu_halt(void); void machine_halt(void) { console_start_sync(); - if (running_on_sim) - printk ("machine_halt called. spinning...\n"); - else - cpu_halt(); + +#ifdef CONFIG_SMP + smp_send_stop(); +#endif + + printk ("machine_halt called. spinning...\n"); while(1); } -- 2.30.2